import api from '../index'

export default {
  list: (data: any) => api.get(`/system/role/list`, {
    params: {
      roleName: data.roleName,
      pageSize: data.size,
      pageNum: data.page,
    },
  }),
  detail: (id: number | string) => api.get(`/system/role/getInfo`, {
    params: {
      roleId: id,
    },
  }),
  create: (data: any) => api.post('/system/role/add', data, {
  }),
  resetPwd: (data: any) => api.post('/system/user/resetPwd', data, {
  }),
  changeStatus: (data: any) => api.post('/system/role/changeStatus', data, {
  }),
  edit: (data: any) => api.post('/system/role/edit', data, {
  }),
  delete: (id: number | string) => api.get(`/system/role/del`, {
    params: {
      roleId: id,
    },
  }),
}
